import java.util.Scanner;

public class Count1 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        int count = 0;
        for (int i = 0; i < 32; i++) {
            if((a & 1) == 1){
                count++;
            }
            a >>= 1;
        }
        System.out.println(count);
    }
}
